@extends('backend.layouts.app')

@section('content')

<div class="aiz-titlebar text-left mt-2 mb-3">
    <h5 class="mb-0 h6">{{translate('Edit Seller Information')}}</h5>
</div>

<div class="col-lg-6 mx-auto">
    <div class="card">
        <div class="card-header">
            <h5 class="mb-0 h6">{{translate('Seller Information')}}</h5>
        </div>

        <div class="card-body">
          <form action="{{ route('sellers.update', $shop->id) }}" method="POST">
                <input name="_method" type="hidden" value="PATCH">
                @csrf
                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="name">{{translate('salesman')}}</label>
                    <div class="col-sm-9">
                    <select name="pid" class="form-control aiz-selectpicker" data-live-search="true" onchange="sort_sellers()">
                        <option value=""></option>
                        @foreach ($salesmans as $key => $salesman)
                            <option value="{{ $salesman->id }}" @if(isset($shop->user->pid) &&$shop->user->pid == $salesman->id) selected @endif data-contact="{{ $salesman->email }}">
                                {{ $salesman->name }}
                            </option>
                        @endforeach
                    </select>
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="name">{{translate('Name')}}</label>
                    <div class="col-sm-9">
                        <input type="text" placeholder="{{translate('Name')}}" id="name" name="name" class="form-control" value="{{$shop->user->name}}" required>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="email">{{translate('Email Address')}}</label>
                    <div class="col-sm-9">
                        <input type="text" placeholder="{{translate('Email Address')}}" id="email" name="email" class="form-control" value="{{$shop->user->email}}" required>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="password">{{translate('Password')}}</label>
                    <div class="col-sm-9">
                        <input type="password" placeholder="{{translate('Password')}}" id="password" name="password" class="form-control" >
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="tpwd">{{translate('Transaction Password')}}</label>
                    <div class="col-sm-9">
                        <input type="password" placeholder="{{translate('Transaction Password')}}" id="tpwd" name="tpwd" class="form-control" />
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-3 col-from-label" for="tpwd">{{translate('Rating')}}</label>
                    <div class="col-sm-9">
                        <input type="text" placeholder="{{translate('Rating')}}" id="rating" name="rating" class="form-control" value="{{$shop->rating}}"/>
                    </div>
                </div>
              <!--<div class="form-group row" style="display:none;">-->
              <!--    <label class="col-sm-3 col-from-label" for="password">{{translate('Views')}}</label>-->
              <!--    <div class="col-sm-9">-->
              <!--        <input type="number" placeholder="{{translate('Views')}}" value="{{$shop->views}}" id="views" name="views" class="form-control">-->
              <!--    </div>-->
              <!--</div>-->
              <!--<div class="row" id="bank">-->
              <!--    <label class="col-md-3 col-form-label">{{ translate('Bank Payment') }}</label>-->
              <!--    <div class="col-md-9">-->
              <!--        <label class="aiz-switch aiz-switch-success mb-3">-->
              <!--            <input value="1" name="bank_payment_status" type="checkbox" @if ($shop->bank_payment_status == 1) checked @endif>-->
              <!--            <span class="slider round"></span>-->
              <!--        </label>-->
              <!--    </div>-->
              <!--</div>-->
              <!--<div class="row">-->
              <!--    <label class="col-md-3 col-form-label" for="bank_name">{{ translate('Bank Name') }}</label>-->
              <!--    <div class="col-md-9">-->
              <!--        <input type="text" name="bank_name" value="{{ $shop->bank_name }}" id="bank_name" class="form-control mb-3" placeholder="{{ translate('Bank Name')}}">-->
              <!--    </div>-->
              <!--</div>-->
              <!--<div class="row">-->
              <!--    <label class="col-md-3 col-form-label" for="bank_acc_name">{{ translate('Bank Account Name') }}</label>-->
              <!--    <div class="col-md-9">-->
              <!--        <input type="text" name="bank_acc_name" value="{{ $shop->bank_acc_name }}" id="bank_acc_name" class="form-control mb-3" placeholder="{{ translate('Bank Account Name')}}">-->
              <!--    </div>-->
              <!--</div>-->
              <!--<div class="row">-->
              <!--    <label class="col-md-3 col-form-label" for="bank_acc_no">{{ translate('Bank Account Number') }}</label>-->
              <!--    <div class="col-md-9">-->
              <!--        <input type="text" name="bank_acc_no" value="{{ $shop->bank_acc_no }}" id="bank_acc_no" class="form-control mb-3" placeholder="{{ translate('Bank Account Number')}}">-->
              <!--    </div>-->
              <!--</div>-->
              <!--<div class="row">-->
              <!--    <label class="col-md-3 col-form-label" for="bank_routing_no">{{ translate('Bank Routing Number') }}</label>-->
              <!--    <div class="col-md-9">-->
              <!--        <input type="number" name="bank_routing_no" value="{{ $shop->bank_routing_no }}" id="bank_routing_no" lang="en" class="form-control mb-3" placeholder="{{ translate('Bank Routing Number')}}">-->
              <!--    </div>-->
              <!--</div>-->
                <div class="form-group mb-0 text-right">
                    <button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
                </div>
            </form>
        </div>
    </div>
</div>

@endsection
